package com.zhao.service;

import com.zhao.bean.Students;
import com.zhao.dao.StudentDa;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
@Controller
public class StudentImpl {
    @Autowired
    StudentDa studentDa;

    public void addStudent(String unmber, String name, String gender, String clbum, String grade) {
        int add = studentDa.addStudent(unmber, name, gender, clbum, grade);
    }
    public void updateStudent(String unmber, String name, String gender, String clbum, String grade) {
        int update = studentDa.updateStudent(unmber, name, gender, clbum, grade);
    }
    public void deleteStudent(String name) {
        int delete = studentDa.deleteStudent(name);
    }
    public Students findStudent(String name) {
        return studentDa.selectStudentName(name);
    }
    public List<Students> findAll() {
        return studentDa.selectStudent();
    }
}